<!DOCTYPE html>
<html lang="zh-CN">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>浏览主题</title>
	<link rel="stylesheet" href="js/filedisk.css" type="text/css">
	<style type="text/css">
		.hover-example {
			color: #2873c9;
			/* 默认文字的颜色 */
		}

		.hover-example:hover {
			color: red;
			/* 当鼠标悬停时，‌文字颜色变色 */
			text-decoration: underline;
			/* 鼠标经过显示下划线 */
		}

		.hover-example-bold {
			/* 默认文字的状态 */
			font-size: 12pt;
			color: #2365b0;
			font-weight: bold;
		}

		.hover-example-bold:hover {
			color: red;
			/* 当鼠标悬停时，‌文字颜色变色 */
			text-decoration: underline;
			/* 鼠标经过显示下划线 *
	}	
	
	.text-container {					/* 只能显示一行文字的样式*/
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
		}

		.thin-table {
			border-collapse: collapse;
			/* 折叠边框 */
			width: 100%;
		}

		.thin-table {
			border-left: 1px solid #c3d0da;
			/* table的左边框 */
			border-right: 1px solid #c3d0da;
			/* table的右边框 */
			border-top: 1px solid #c3d0da;
			/* table的顶部边框 */
			border-bottom: 1px solid #c3d0da;
			/* table的底部边框 */
		}

		.thin-table th,
		.thin-table td {
			padding: 5px;
			/* 单元格内边距 */
			text-align: left;
			/* 单元格内文本对齐方式 */
			vertical-align: top;
			/* 单元格内文本垂直对齐方式 */
			border-top: 0px solid #c3d0da;
			/* 仅显示下边框线 */
			border-bottom: 0px solid #c3d0da;
			/* 仅显示下边框线 */
		}

		.thin-tableC {
			border-collapse: collapse;
			width: 90%;
			border: 1px solid #ddd;
			box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.3);
			/* 水平偏移、垂直偏移、模糊半径、扩散半径以及颜色 */
		}

		.thin-tableC th,
		.thin-tableC td {
			border: 0px solid #ddd;
			padding: 5px;
			text-align: left;
		}

		.td-frame {
			word-wrap: break-word;
			white-space: normal;
			border: 0px solid #c3d0da;
			border-right: 1px solid #c3d0da;
			/* table的右边框 */
		}

		.c1 {
			width: 100px;
			height: 100px;
			border: 3px solid #F3970C;
			border-radius: 50%;
			overflow: hidden;
		}

		label {
			position: relative;
		}

		#userimg {
			position: absolute;
			left: 1px;
			top: 0px;
			opacity: 0;
			width: 100px;
			height: 24px;
		}

		#userbtn {
			font-size: 16px;
			padding: 1px 1px;
			background: none;
			color: #0055ff;
			border: none;
			width: 100px;
		}

		.STYLE2 {
			color: #0066CC;
			font-weight: bold;
		}
	</style>
</head>

<body>
	<table width="100%" height="100%" border="0" cellpadding="1" cellspacing="0" class="TitleColor">
		<tr>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
		</tr>

		<tr>
			<td>&nbsp;</td><!--左边空白间隙部分-->

			<td width="60%" height="100%" valign="top">
				<table width="100%" height="100%" border="1" cellpadding="0" cellspacing="0"><!--中间显示部分-->
					<td width="100%" height="100%">
						<table width="100%" height="100%" border="0" bgcolor="#FFFFFF">
							<td>&nbsp;</td>
							<td width="95%" valign="top" height="100%">
								<table width="100%" border="0" cellpadding="1" cellspacing="0"><!--中间显示部分-->
									<td>
										<table width="100%" height="40" align="center" border="0" id="pathTable">
											<tr>
												<td id="location0" style="white-space: nowrap"><strong><a
															href="forum.htm"></a></strong></td>
												<td id="location1" style="white-space: nowrap">&nbsp;</td>
												<td id="location2" style="white-space: nowrap">&nbsp;</td>
												<td id="location3" style="white-space: nowrap">&nbsp;</td>
												<td id="location4" style="white-space: nowrap">&nbsp;</td>
												<td id="location5" width="100%">&nbsp;</td>
											</tr>
										</table>

										<table width="100%" border="0">
											<tr>
												<td width="100%">&nbsp;</td>
												<!--<td style="white-space: nowrap" onClick="comment()"><span class="STYLE2">发表回复</span></td>-->
												<!--<td style="white-space: nowrap" ><span class="STYLE2"><a href="comment.htm">发表回复</a></span></td>-->
											</tr>
										</table>

										<!--
								<table width="100%" border="0" class="thin-table">
									<tr bgcolor="#dfe7ee" height="50px">
										<td style="vertical-align:middle" width="100%">时间</td>
										<td style="vertical-align:middle; white-space: nowrap">序列号</td>
									</tr>
								</table>
								<table style="border-collapse: collapse; border: 1px solid #c3d0da;" width="100%">
									<tr>
										<td class="td-frame" valign="top">
											<table width="200px" border="0">
												<tr>
												<td><span class="hover-example-bold">昵称</span></td>
												</tr>
												<tr>
												<td>会员</td>
												</tr>
												<tr>
												<td>注册时间</td>
												</tr>
												<tr>
												<td>帖子数量</td>
												</tr>
												<tr>
												<td>积分</td>
												</tr>
											</table>
										</td>
									  <td colspan="5" valign="top">
											<table class="thin-tableC" style="display: visibility;" align="center" width="100%">
											  <tr>
												<td><strong>被评论者名字</strong></td>
											  </tr>
											  <tr>
												<td>被评论的内容</td>
											  </tr>
											</table>
											<table width="100%" border="0" align="center">
											  <tr>
												<td width="100%">回复的内容
												昨夜星光灿烂，夜半却有习习凉风；我们酒筵设在画楼西畔、桂堂之东。身上无彩凤的双翼，不能比翼齐飞；内心却像灵犀一样，感情息息相通。互相猜钩嬉戏，隔座对饮春酒暖心； 分组来行酒令，决一胜负烛光泛红。可叹呵，听到五更鼓应该上朝点卯；策马赶到兰台，像随风飘转的蓬蒿。昨夜星光灿烂，夜半却有习习凉风；我们酒筵设在画楼西畔、桂堂之东。身上无彩凤的双翼，不能比翼齐飞； 内心却像灵犀一样，感情息息相通。互相猜钩嬉戏，隔座对饮春酒暖心；分组来行酒令，决一胜负烛光泛红。可叹呵，听到五更鼓应该上朝点卯昨夜星光灿烂，夜半却有习习凉风；我们酒筵设在画楼西畔、桂堂之东。 身上无彩凤的双翼，不能比翼齐飞；内心却像灵犀一样，感情息息相通。互相猜钩嬉戏，隔座对饮春酒暖心；分组来行酒令，决一胜负烛光泛红。可叹呵，听到五更鼓应该上朝点卯昨夜星光灿烂，夜半却有习习凉风； 我们酒筵设在画楼西畔、桂堂之东。身上无彩凤的双翼，不能比翼齐飞；内心却像灵犀一样，感情息息相通。互相猜钩嬉戏，隔座对饮春酒暖心；分组来行酒令，决一胜负烛光泛红。可叹呵，听到五更鼓应该上朝点卯.
												</td>
											  </tr>
											</table>	
										</td>
									</tr>
									<tr height="40px">
										<td width="200px" style="white-space: nowrap" class="td-frame">上线</td>
										<td width="100%"></td>
										<td style="min-width: 50px; white-space: nowrap; display: visibility" class="hover-example" onClick="onDelete()">删除</td>
										<td style="min-width: 50px; white-space: nowrap" class="hover-example" onClick="onReply()">回复</td>
										<td style="min-width: 50px; white-space: nowrap" class="hover-example" onClick="onReport()">举报</td>	
										<td style="min-width: 50px; white-space: nowrap" class="hover-example" onClick="onLike()">点赞</td>																		
									</tr>									
								</table>								
								-->

										<div id="table-container" class="thin-table" align="center">
											<!-- 表格将被动态添加到这个div中 -->
										</div>

										<table border="0">
											<tr>
												<td height="30px">&nbsp;</td>
											</tr>
											<tr>
												<td>快速回复</td>
											</tr>
										</table>

										<table border="0" class="thin-table">
											<tr>
												<td> <textarea
														style="min-height:100px; min-width:100%; max-height:80%; max-width:400px;"
														placeholder="输入内容" id="posttext" maxlength=''></textarea></td>
											</tr>
										</table>

										<table border="0">
											<tr>
												<td>
													<label for="userimg">
														<input type="button" id="userbtn" value="插入图片" align="middle">
														<input type="file" id="userimg" onChange="selectImg(this);"
															accept="image/*" title="选择图片">
													</label>
												</td>
												<td>表情</td>
											</tr>
											<tr>
												<td align="left"><input type="submit" onClick="confirm()" value="提交回复"
														style="height:40px;width:100px;"></td>
											</tr>
										</table>

									</td>
								</table>
							</td><!--中间显示部分-->
							<td>&nbsp;</td>
						</table>
					</td>
				</table>
			</td><!--中间显示部分-->

			<td>&nbsp;</td><!--右边空白间隙部分-->
		</tr>

		<tr>
			<td>&nbsp;</td>
			<td height="50" align="center">
				<div id='footerpage'></div>
			</td>
			<td>&nbsp;</td>
		</tr>

	</table>

</body>

<!--
<script src="js/blueimp-md5-2.18.0.js"></script>
<script src="js/jquery-3.5.1.min.js"></script>
<script src="js/spark-md5.min.js"></script>
-->
<script>
	function loadScript(c, d) { var b = document.createElement("script"); b.type = "text/javascript"; var e = sessionStorage.getItem(c); e ? (b.textContent = e, d(b)) : fetch(c).then(function (a) { return a.text() }).then(function (a) { b.textContent = a; sessionStorage.setItem(c, a); d(b); location.reload() })["catch"](function (a) { console.error("Error loading the script:", a) }) };
	loadScript("tu_0.js", function (script) { document.head.appendChild(script); });
</script>
<script type="text/javascript" language="javascript">
	if (sessionStorage.getItem("tu_0.js")) {		// 读取记忆是否已保存js文件
		loadHtml("footer.htm", "footerpage");
	}

	/*
	function comment(){
		sessionStorage.setItem("isReply",0);
		window.location.href="comment.htm";
	}
	*/

	function confirm() {
		var posttext = document.getElementById("posttext").value;
		if (posttext == "") {
			alert("请输入评论内容");
			return false;
		}
		myTimer("commentopr", 0, posttext, 0);
	}

	var PostId = sessionStorage.getItem("PostId");
	var Text1 = sessionStorage.getItem("Text1");
	var Text2 = sessionStorage.getItem("Text2");
	var WorksType = sessionStorage.getItem("WorksType");
	var ForumId = sessionStorage.getItem("ForumId");
	//alert("PostId--"+PostId +"--Text1--"+ Text1+"--Text2--"+Text2+"--WorksType--"+WorksType+"--ForumId--"+ForumId);

	/*
	$('#userimg').change(function() {
		var fileInput = document.getElementById('userimg');
		if(!fileInput.files || !fileInput.files[0]){
			alert("无效文件");
			return;
		}
		var file = fileInput.files[0];
		// 获取textarea元素
		var text = document.getElementById('posttext');
		// 添加字节	//var name += file.name;
		text.value += "\n"+file.name+"\n"; //'添加的字节内容'; 
	})
	*/

	var first = 0;
	function fun() {
		if (first == 0) {
			first = 1;
			setTimeout(function () { myTimer("cookie", 0, 0, 0) }, 0);		//自动发送post指,只有打开页面的时候，才发送一次	
		} else {

		}
	}
	setInterval("fun()", 1000);			// 周期性调用函数 每隔100毫秒调用一次

	function myTimer(type, file, value, CommentId) {
		var phpName;
		if (type == "post" || type == "commentopr" || type == "comment" || type == "commentlike") {
			phpName = "forum.php";
		} else {
			phpName = "index.php";
		}
		var xhr = postPhp(phpName);

		xhr.onreadystatechange = function () {			//2.注册回调函数
			var array_name = txtUnzip(xhr);
			if (array_name != null) {
				if (type == "cookie") {
					cookiemyFunction(array_name)	// 返回的信息在html页面显
				}
				if (type == "post" || type == "comment") {
					myFunction(array_name)			// 返回的信息在html页面显
				}
				if (type == "commentopr") {
					commentoprmyFunction(array_name)	// 返回的信息在html页面显
				}
				if (type == "commentlike") {
					likemyFunction(array_name)	// 返回的信息在html页面显
				}
				if (type == "userInfo") {
					userInfoFunction(array_name)		// 返回的信息在html页面显
				}
				if (type == "getimg") {
					getimgFunction(array_name)		// 返回的信息在html页面显
				}
			}
		}

		if (type == "cookie") {
			txtZip(xhr, "t:ncki");
		}
		if (type == "post") {
			//alert("PostId--"+PostId +"--Text1--"+ Text1+"--Text2--"+Text2+"--WorksType--"+WorksType+"--ForumId--"+ForumId);
			file = 0;
			value = 32;
			txtZip(xhr, "t:sfpr&fidr:" + ForumId + "&fbwt:" + WorksType + "&fpid:" + PostId + "&offs:" + file + "&qtya:" + value);
		}

		if (type == "commentopr") {	// 添加评论内容
			var commentText = txtB64Enc(value);	// 内容
			var operate = file; // 0增1删2改
			//alert("operate--"+operate +"PostId--"+PostId +"--Text1--"+ Text1+"--Text2--"+Text2+"--WorksType--"+WorksType+"--ForumId--"+ForumId);
			switch (operate) {
				case 0:
					txtZip(xhr, "t:sfco&fidr:" + ForumId + "&fbwt:" + WorksType + "&fpid:" + PostId + "&fcdt:" + commentText + "&fopr:" + operate, 1);
					break;
				case 1:
					txtZip(xhr, "t:sfco&fidr:" + ForumId + "&fbwt:" + WorksType + "&fpid:" + PostId + "&fcid:" + CommentId + "&fopr:" + operate, 1);
					break;
				//case 2: txtZip(xhr, "t:sfco&fidr:" + ForumId + "&fbwt:" + WorksType + "&fpid:" + PostId + "&fcid:" + CommentId + "&fcdt:" + + commentText + "&fopr:" + operate); break; 
			}
			document.getElementById("posttext").value = "";
		}

		if (type == "comment") {		// 读取评论列表数据
			//alert("读取评论列表数据");
			//alert("ForumId--"+ForumId+"--WorksType--"+WorksType+"PostId--"+PostId+"--CommentId--"+CommentId+"--file--"+file+"--value--"+value);
			//txtZip(xhr, "t:sfcr&fidr:" + ForumId + "&fbwt:" + WorksType + "&fpid:" + PostId + "&fcid:" + CommentId + "&offs:" + file + "&qtya:" + value);
		}

		if (type == "commentlike") {
			var isLike = file; // 评论是否点赞
			//alert("ForumId--"+ForumId+"--WorksType--"+WorksType+"PostId--"+PostId+"--isLike--"+isLike);
			txtZip(xhr, "t:sfcl&fidr:" + ForumId + "&fbwt:" + WorksType + "&fpid:" + PostId + "&fcid:" + CommentId + "&fcsl:" + isLike, 1);
		}

		if (type == "replylike") {
			var isLike = 1; // 回复评论是否点赞
			//txtZip(xhr, "t:sfrl&fidr:" + ForumId + "&fbwt:" + WorksType + "&fpid:" + PostId + "&fcid:" + CommentId + "&frid:" + ReplyId + "&frsl:" + isLike);
		}

		if (type == "userInfo") {
			var dtlt = 0; // 0 少量用户信息(id,昵称,头像,积分,vip,wealth,sing) 1 详细用户信息
			var uids = txtB64Enc(file);
			txtZip(xhr, "t:nudt&uids:" + uids + "&dtlt:" + 0);
		}
		if (type == "getimg") {
			txtZip(xhr, "t:sbgi&kcid:" + file + "&imgt:" + value);
		}
	}

	function cookiemyFunction(arr) {
		switch (arr.result) {
			case "ok":
				myTimer("post", 0, 0, 0);
				break;
			default:
				alert('请先登录后，再操作！');
				window.location.href = "user.htm";
				return false;
		}
	}
	function commentoprmyFunction(arr) {
		switch (arr.result) {
			case "ok":
				myTimer("post", 0, 0, 0);
				break;
			default:
				alert('回复失败，请重新回复！');
				return false;
		}
	}
	function likemyFunction(arr) {
		switch (arr.result) {
			case "ok":
				myTimer("post", 0, 0, 0);
				break;
			default:
				alert('点赞失败，请重新点赞！');
				return false;
		}
	}




	var pathtable = document.getElementById("pathTable");	// 清空pathTable显示的内容
	var rows = pathtable.getElementsByTagName("tr");
	var cols = rows[0].getElementsByTagName("td");
	for (var j = 0; j < cols.length; j++) {
		cols[j].textContent = " ";				// 先清空td里面的内容，避免有残留的内容显示			
	}

	// 固定的位置和字眼		
	cols[0].textContent = "首页>>";
	cols[0].style.color = "blue"; 			// 添加文字颜色，也可以输入"#FF0000"的数值
	cols[0].style.fontWeight = ""; 			// 清空字体加粗

	cols[0].onclick = function () {			// 点击 返回上一级			
		window.location.href = "forum.htm";
	}
	cols[1].onclick = function () {			// 点击 返回上一级	
		javascript: history.back();
	}

	cols[1].textContent = Text1 + ">>";		// 设置显示文字的内容	
	cols[1].style.color = "blue"; 			// 添加文字颜色，也可以输入"#FF0000"的数值

	cols[2].textContent = Text2;			// 设置显示文字的内容	
	cols[2].style.color = "black"; 			// 添加文字颜色，也可以输入"#FF0000"的数值	

	// 添加鼠标悬停事件
	cols[0].addEventListener('mouseenter', function () {
		this.classList.add('hover-example');
		this.style.color = 'red'; 		 // 鼠标悬停时改变颜色为红色
	});
	cols[0].addEventListener('mouseleave', function () {
		this.classList.remove('hover-example');
		this.style.color = 'blue';	 // 鼠标离开时恢复默认颜色
	});
	cols[1].addEventListener('mouseenter', function () {
		this.classList.add('hover-example');
		this.style.color = 'red'; 		 // 鼠标悬停时改变颜色为红色
	});
	cols[1].addEventListener('mouseleave', function () {
		this.classList.remove('hover-example');
		this.style.color = 'blue';	 // 鼠标离开时恢复默认颜色
	});


	function tableHtml(ary, item, index) {			// 列表显示和操作
		var container = document.getElementById('table-container');
		var tables = [];
		var table = document.createElement('table');
		// 帖子首页 [[idx0,评论Id,评论用户Id,"评论内容", 评论回复数, 评论点赞数,是否点赞,"评论时间"],[...],...]
		var Number = parseInt(ary[0]) + 1;
		var CommentId = ary[1];
		var UserId = ary[2];
		var CommentText = decodeURI(ary[3]);
		var CommentTime = decodeURI(ary[7]);
		var ReplyQty = "回复(" + ary[4] + ")";
		var IsLike = parseInt([6]) == 1;
		var Like = IsLike ? "已点赞(" + ary[5] + ")" : "点赞(" + ary[5] + ")";

		table.border = '0';
		table.style.width = '100%'; 			// 设置宽度	
		//table.style.backgroundColor = "yellow";// 设置颜色

		if (item.onli == "1") {							// 判断账号是否是上线状态
			var online = '上线';
		} else {
			var online = '离线';
		}

		if (item.text == "") {							// 判断评论是否有回复的信息
			var hide = 'style="display: none;"';		// 隐藏信息					
		} else {
			var hide = 'style="display: visibility;"'; // 显示回复信息
		}

		if (item.dele == "1") {							// 判断评论息是否可以被删除
			var Delehide = ' style="min-width: 50px; visibility: hidden; white-space: nowrap" class="hover-example" onClick="onDelete()"';
		} else {
			var Delehide = ' style="min-width: 50px; display: visbility; white-space: nowrap" class="hover-example" onClick="onDelete()"';
		}

		var tbodyTr = document.createElement('td');
		tbodyTr.innerHTML =
			'<table width="100%" border="0" class="thin-table">' +
			'<tr bgcolor="#dfe7ee" height="32px">' +
			'<td style="vertical-align:middle; white-space: nowrap">' + "#" + Number.toString() + '</td>' +
			'</tr>' +
			'</table>' +
			'<table style="border-collapse: collapse; border: 1px solid #c3d0da;" width="100%">' +
			'<tr>' +
			'<td class="td-frame" valign="top">' +
			'<table width="200px" border="0">' +
			'<tr><td id="onProfile"><span class="hover-example-bold">' + item.nick + '</span></td></tr>' +
			'<tr><td>' + item.memb + '</td></tr>' +
			'<tr><td>' + item.date + '</td></tr>' +
			'<tr><td>' + item.post + '</td></tr>' +
			'<tr><td>' + item.weae + '</td></tr>' +
			'</table>' +
			'</td>' +
			'<td colspan="5" valign="top">' +
			// '<table class="thin-tableC"'+ hide +'align="center" width="100%">'+
			//   '<tr>' +
			// 	'<td id="onReply"><strong>'+item.repl+'</strong></td>' +
			//   '</tr>' +
			//   '<tr>' +
			// 	'<td>'+item.text+'</td>' +
			//   '</tr>' +
			// '</table>'+
			'<table width="100%" border="0" align="center">' +
			'<tr>' +
			'<td width="100%">' + CommentText + '</td>' +
			'</tr>' +
			'</table>' +
			'</td>' +
			'</tr>' +
			'<tr height="40px">' +
			// '<td width="200px" style="white-space: nowrap" class="td-frame">'+online+'</td>'+
			'<td width="100%"></td>' +
			'<td style="min-width: 50px; white-space: nowrap" class="hover-example">' + CommentTime + '</td>' +
			'<td id="onDelete"' + Delehide + '>删除</td>' +
			'<td style="min-width: 50px; white-space: nowrap" class="hover-example" id="onComment">' + ReplyQty + '</td>' +
			'<td style="min-width: 50px; white-space: nowrap" class="hover-example" id="onReport">举报</td>' +
			'<td style="min-width: 50px; white-space: nowrap" class="hover-example" id="onLike">' + Like + '</td>' +
			'</tr>' +
			'</table>';

		table.appendChild(tbodyTr);
		container.appendChild(table);
		tables.push(table);
		// 添加点击事件
		const onProfile = table.querySelector('#onProfile');
		if (onProfile) {
			onProfile.addEventListener('click', function () {
				alert("点击名字+" + item.nick);
			});
		}

		const onReply = table.querySelector('#onReply');
		if (onReply) {
			onReply.addEventListener('click', function () {
				alert("点击评论者+" + item.repl);
			});
		}

		const onDelete = table.querySelector('#onDelete');
		if (onDelete) {
			onDelete.addEventListener('click', function () {
				myTimer("commentopr", 1, ary[3], ary[1]);
			});
		}

		const onComment = table.querySelector('#onComment');
		if (onComment) {
			onComment.addEventListener('click', function () {
				sessionStorage.setItem("CommentId", ary[1]);
				window.location.href = "comment.htm";
			});
		}

		const onReport = table.querySelector('#onReport');
		if (onReport) {
			onReport.addEventListener('click', function () {
				alert("点击举报" + index);
			});
		}

		const onLike = table.querySelector('#onLike');
		if (onLike) {
			onLike.addEventListener('click', function () {
				myTimer("commentlike", 1, 0, ary[1]);
			});
		}
	}

	function myFunction(arr) {
		switch (arr.result) {
			case "ok":
				$("#table-container").empty();
				var userIds = "";
				arr.list.forEach(function (item, index) {
					var ary = Array.from(item);
					myTimer("getimg", ary[2], 257);
					userIds += ary[2] + ",";
					function addTables() {
						try {
							tableHtml(ary, item, index);
						} catch (error) {
							console.error('addTables 函数内部出错:', error);
						}
					}
					addTables();
				});
				myTimer("userInfo", userIds, 0);
				break;
			default:
				alert('数据出错，请刷新');
				return false;
		}
	}
	function userInfoFunction(arr) {
		switch (arr.result) {
			case "ok":
				const container = document.getElementById('table-container');
				const tables = container.getElementsByTagName('table');
				arr.list.forEach(function (item, index) {
					const ary = Array.from(item);
					const userId = ary[0];
					for (let i = 0; i < tables.length; i++) {
						const table = tables[i];
						const rows = table.getElementsByTagName('tr');
						for (let j = 0; j < rows.length; j++) {
							const row = rows[j];
							const cells = row.getElementsByTagName('td');
							if (cells.length > 0 && cells[0].textContent === userId.toString()) {
								for (let k = 0; k < ary.length; k++) {
									if (cells[k]) {
										cells[k].textContent = ary[k];
									}
								}
								break;
							}
						}
					}
				});
				break;
			default:
				alert("userInfo 错误:" + arr.result);
				return false;
		}
	}
	function getimgFunction(arr) {
		switch (arr.result) {
			case "ok":
				const img = document.getElementById("showImg");
				if (img) {
					const picImg = "uimg/" + arr.uimg;
					const randomParam = Math.random();
				picImg += "?v=" + randomParam;

				img.onload = function () {
					console.log("图片加载成功");
				};
				img.onerror = function () {
					alert("图片加载失败: " + picImg);
				};
				img.src = picImg;
			} else {
				alert("未找到图片元素");
			}
			break;
		default:
			alert("getimg 错误:" + arr.result);
			return false;
		}
	}
</script>

</html>